package com.rentcars.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rentcars.entity.Clientuser;
import com.rentcars.mapper.ClientuserMapper;
import com.rentcars.service.ClientuserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.beans.Transient;
import java.util.List;

/**
 * @author 86186
 */
@Service("ClientuserService")
public class ClientuserServiceImpl implements ClientuserService {

    @Autowired
    private ClientuserMapper clientuserMapper;

   /**
     * 分页显示
     * @return
     */
   @Override
   public PageInfo<Clientuser> selectAllClientuser(Clientuser clientuser,Integer curr, Integer pageSize) {
       PageHelper.startPage(curr,pageSize);
       List<Clientuser>clientusers=clientuserMapper.getListClientuser(clientuser);
       return new PageInfo<Clientuser>(clientusers);
   }

    @Override
    public Integer insertClientUser(Clientuser clientuser) {
        return clientuserMapper.insertSelective(clientuser);
    }

    @Override
    public Clientuser selectClientUserById(String uid) {
        return clientuserMapper.selectClientUserById(uid);
    }

    @Override
    public int updateClientUser(Clientuser clientuser) {
        return clientuserMapper.updateClientUser(clientuser);
    }

    @Override
    public int deleteByPrimaryKey(String uid) {
        return clientuserMapper.deleteByPrimaryKey(uid);
    }@Override
    public int delClientUser(List<String> uidList) {
        return clientuserMapper.delClientUser(uidList);
    }




    public ClientuserMapper getClientuserMapper() {
        return clientuserMapper;
    }

    public void setClientuserMapper(ClientuserMapper clientuserMapper) {
        this.clientuserMapper = clientuserMapper;
    }


}
